<?php echo $this->render('header.phtml'); ?>
<div class="bar">
<?php echo $this->menu ?>
</div>
<div class="search_field">
	<form method="post" action="<?php echo $this->baseUrl ?>/carrinho/buscar">
		<p><input type="text" name="search" class="search" /> <input type="submit" value="Buscar" class="searchSubmit" /></p>
	</form>
</div>
<h1><?php echo $this->escape($this->title); ?></h1>
<table border="0">
<?php
	$counter = 1;
	//var_dump($this->medicamentos);
	foreach ($this->medicamentos as $medicamento){
		if ($counter % 2 != 0){
			echo $counter == 1 ? '<tr>' : '</tr><tr>';
		}
?>
	<td class="right_articles">
		<?php echo $this->escape($medicamento['descricao'])?><br/>
		<?php echo $this->escape($medicamento['valor'])?><br/>
		<?php echo $this->escape('Estoque: ')?>
		<?php echo $this->escape($medicamento['quantidade'])?><br/>
		<a href="<?php echo $this->baseUrl; ?>/carrinho/cesta?id=<?php echo $this->escape($medicamento['id'])?>">Comprar</a>
	</td>
	
<?php
		$counter++;
	}
?>
</table>
<a href="<?php echo $this->baseUrl; ?>/carrinho/cesta/">carrinho</a>
<?php echo $this->render('footer.phtml'); ?>